home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-12-11 | 4.8 KB | 178 lines | [TEXT/MPS ] |
- /*
- File: CappuccinoLinking.cpp
-
- Contents: Stub functions to be implemented for linking support.
-
- If you wish to add linking support to a part, you must
- implement the functions in this file. If you do not wish
- to support this feature, you can save a little space by removing
- these functions and the similarly-named functions in the SOM
- class.
-
- Written by: Troy Gaul
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
- */
-
- // -- Compiler/Preprocessor Switches --
-
- #ifndef _COMPILERDEFS_
- #include "CompDefs.h"
- #endif
-
- // -- OpenDoc Utilities --
-
- #ifndef _EXCEPT_
- // Exceptions define several important macros (eg. CHECKENV)
- // which are used in the SOM method dispatch glue. If Except.h
- // is not included early enough, exceptions may not be thrown
- // correctly when returning from a SOM method with the "ev" parameter set.
- #include <Except.h>
- #endif
-
- // -- Cappuccino Includes --
-
- #ifndef _CAPPUCCINO_
- #include "Cappuccino.h"
- #endif
-
- #ifndef _CAPPUCCINOCONTENT_
- #include "CappuccinoContent.h"
- #endif
-
- #ifndef _CAPPUCCINODEF_
- #include "CappuccinoDef.h"
- #endif
-
- #ifndef _CAPPUCCINOGLOBALS_
- #include "CappuccinoGlobals.h"
- #endif
-
- // -- OpenDoc Includes --
-
- #ifndef _ODTYPES_
- #include <ODTypes.h>
- #endif
-
- // -- OpenDoc Utilities --
-
- #ifndef _ODUTILS_
- #include <ODUtils.h>
- #endif
-
-
- //------------------------------------------------------------------------------
- // Method: CreateLink
- // Origin: ODPart
- //
- // Description: This method is called ...
- //------------------------------------------------------------------------------
-
- ODLinkSource* Cappuccino::CreateLink( Environment* ev,
- ODByteArray* data )
- {
- SOM_Trace("Cappuccino","CreateLink");
-
- ODLinkSource* linkSource = kODNULL;
-
- THROW(kODErrDoesNotLink);
-
- return linkSource;
- }
-
- //------------------------------------------------------------------------------
- // Method: LinkUpdated
- // Origin: ODPart
- //
- // Description: This method is called ...
- //------------------------------------------------------------------------------
-
- void Cappuccino::LinkUpdated( Environment* ev,
- ODLink* link,
- ODUpdateID updateID )
- {
- SOM_Trace("Cappuccino","LinkUpdated");
-
- THROW(kODErrDoesNotLink);
- }
-
- //------------------------------------------------------------------------------
- // Method: RevealLink
- // Origin: ODPart
- //
- // Description: This method is called ...
- //------------------------------------------------------------------------------
-
- void Cappuccino::RevealLink( Environment* ev,
- ODLinkSource* linkSource )
- {
- SOM_Trace("Cappuccino","RevealLink");
-
- THROW(kODErrDoesNotLink);
- }
-
- //------------------------------------------------------------------------------
- // Method: LinkStatusChanged
- // Origin: ODPart
- //
- // Description: This method is called ...
- //------------------------------------------------------------------------------
-
- void Cappuccino::LinkStatusChanged( Environment* ev,
- ODFrame* frame )
- {
- SOM_Trace("Cappuccino","LinkStatusChanged");
-
- // Since we currently don't link and don't have embedded content, we
- // don't need to do anything for this call. However, if we are embedded
- // in a link, then this will be called to tell us when the link status
- // of one of our frames changes. We must implement this function because
- // ODPart requires us to.
- }
-
- //------------------------------------------------------------------------------
- // Method: EmbeddedFrameUpdated
- // Origin: ODPart
- //
- // Description: This method is called ...
- //
- // Note: This method only needs to be implemented for a part that
- // supports embedding.
- //------------------------------------------------------------------------------
-
- void Cappuccino::EmbeddedFrameUpdated( Environment* ev,
- ODFrame* frame,
- ODUpdateID change )
- {
- SOM_Trace("Cappuccino","EmbeddedFrameChanged");
-
- // The default behavior for this method is to do nothing. The reason
- // is that a part which does not support linking may be embedded within
- // a part which publishes a link source, and then itself embed a part which
- // calls ODFrame::ContentUpdated. This part will be notified that the
- // EmbeddedFrameUpdated, and the correct thing to do is nothing. Only
- // parts which want to do something special in response to this notification
- // need to override this method.
- }
-
- //------------------------------------------------------------------------------
- // Method: EditInLinkAttempted
- // Origin: ODPart
- //
- // Description: This method is called ...
- //
- // Note: This method only needs to be implemented for a part that
- // supports embedding.
- //------------------------------------------------------------------------------
-
- ODBoolean Cappuccino::EditInLinkAttempted( Environment* ev,
- ODFrame* frame )
- {
- SOM_Trace("Cappuccino","EditInLinkAttempted");
-
- THROW(kODErrCannotEmbed);
-
- return kODFalse;
- }
-
-